package com.zx.map.service;

import com.zx.map.dao.model.ShareProfitLog;
import com.zx.map.service.model.AgentInfoModel;
import com.zx.map.service.model.MerchantInfoModel;
import com.zx.map.service.model.ShareProfitLogModel;
import com.zx.mobile.domain.TransferShareProfitDomain;
import org.springframework.dao.DataAccessException;

import java.util.List;
import java.util.Map;

/**
 * Created by IntelliJ IDEA. User: Administrator Date: 14-3-1 Time: 上午11:06 To
 * change this template use File | Settings | File Templates.
 */
public interface ShareProfitLogService {

    /**
     * 获取金额
     *
     * @param merchantId
     * @return
     * @throws DataAccessException
     */
     ShareProfitLogModel queryProfitByCustId(String cussId) throws DataAccessException;
     ShareProfitLogModel queryProfitByCustSysAccount(String custSysAccount) throws DataAccessException;
    /**
     * 根据Model查找列表
     *
     * @param model
     * @return
     * @throws org.springframework.dao.DataAccessException
     */
     List<ShareProfitLogModel> getListByModel(ShareProfitLogModel model)
            throws DataAccessException;

    /**
     * 新增并返回主键
     *
     * @param model
     * @return
     * @throws org.springframework.dao.DataAccessException
     */
     String add(ShareProfitLogModel model) throws DataAccessException;

    /**
     * 更新并返回主键
     *
     * @param model
     * @throws org.springframework.dao.DataAccessException
     */
     String update(ShareProfitLogModel model) throws DataAccessException;

    /**
     * 删除
     *
     * @return
     * @throws org.springframework.dao.DataAccessException
     */
     void delete(ShareProfitLogModel model) throws DataAccessException;

    /**
     * 分享收益转出
     *
     * @param transferShareProfitDomain
     * @param merchantId
     */
     void transferShareProfit(
            TransferShareProfitDomain transferShareProfitDomain,
            MerchantInfoModel curMerchantInfoModel);

    /**
     * 分页查询
     *
     * @param pageSize
     * @param pageNum
     * @param model
     * @return
     * @throws DataAccessException
     */
    @Deprecated
     Map getPageByDomain(int pageSize, int pageNum, ShareProfitLogModel model)
            throws DataAccessException;

    Map queryShareProfitLog(AgentInfoModel currentAgentInfo,AgentInfoModel searchAgentInfoModel, ShareProfitLog shareProfitLogModel);

}
